#ifndef _SYNCRONIZATION_MESSAGE_H
#define _SYNCRONIZATION_MESSAGE_H

namespace Graphics
{
	class SpriteInternal;
}

namespace Syncronization
{
	struct Message
	{
		enum Type
		{
			ADD_SPRITE,
			DELETE_SPRITE,
			UNKNOWN
		};

		Type type;

		Message() : type(UNKNOWN) {}
	};

	struct MessageSprite : public Message
	{
		Graphics::SpriteInternal* sprite;
		
		static MessageSprite* CreateAddSprite(Graphics::SpriteInternal* aSprite)
		{
			MessageSprite* msg = new MessageSprite;
			msg->sprite = aSprite;
			msg->type = ADD_SPRITE;
			return msg;
		}

		static MessageSprite* CreateDeleteSprite(Graphics::SpriteInternal* aSprite)
		{
			MessageSprite* msg = new MessageSprite;
			msg->sprite = aSprite;
			msg->type = DELETE_SPRITE;
			return msg;
		}
	};
}

#endif